package main

/**
 *
 * @param head ListNode类
 * @return ListNode类
 */
func deleteDuplicates_2(head *ListNode) *ListNode {
	// write code here
	node := head
	for node != nil {
		if node.Next != nil && node.Val == node.Next.Val {
			node.Next = node.Next.Next
			continue
		}
		node = node.Next
	}
	return head
}
